Go to the previous, next, chapter, table of contents.
2.4 File Types Configuration
Here you can configure X-Arc to make it able to recognize different file
types. File type recognition is used each time you want to view a file from
an archive to use a suitable program.
File type recognition is based on both file name and contents. To add a new
file type, just click on "Add" and then fill in all fields in the window that
appears.
- The Name field is just used to assign a name for the file type.
- The Filename pattern field should contain an AmigaDOS pattern to
recognize a file by its name.
For example "#?.txt"
locates all filenames ending in ".txt".
- Contents pattern specifies a pattern to recognize a file by its contents.
For example, HTML files could be
recognized because they all start with "<HTML>", thus a suitable contents
pattern would be "<HTML>#?".
- The cycle cadget between those two string gadgets indicates how the
recognizing operation should work. If you select And a file must match
both name and contents patterns, while if you select Or only
one pattern match will do.
- The Viewer command field indicates your favourite viewer for that
file type. The command must be synchronous, so don't launch it with "Run".
In this field, you can use two keywords: "%f" indicates the name of file to
view, while "%p" will be converted to the name of the
pubblic screen X-Arc is currently open on. So, you can open your viewer
on the same screen as X-Arc.
Note:
- Pattern fields accept all kinds of standard AmigaDOS patterns, such as
#?~.(foo|bar???.?|Amiga#?rulez).
- Pattern matching is performed following list order, from top to bottom.
For this reason I suggest you to sort file types according to some kind of
priority order.
- In a next version you will be able to have X-Arc create the contents
patterns automatically, with the aid of a small window called Sniffer.
This window should already have been present in this version, but since it is
not completely OK yet, it would have delayed X-Arc's release even more.
Go to the previous, next, chapter, table of contents.